
#ifndef __LINEDISPLAY_H__
#define __LINEDISPLAY_H__

#ifndef WINAPI
#include <windows.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#pragma warning(disable : 4996)

	BOOL WINAPI InitializeLD(int nPort = 3, int nParity = 2, int nBaud = 9600, unsigned int nLDType = 0);

	// Methods
	BOOL WINAPI OpenLD();

	BOOL WINAPI CloseLD();

	BOOL WINAPI ClearText();

	BOOL WINAPI DisplayText(LPCTSTR pStr, int nLength, int nRow = 0);

	BOOL WINAPI DisplayTextAt(int nRow, int nCol, LPCTSTR pStr, int nAttribute = 0);

	typedef enum _EDISP_DIRECTION
	{
		DISP_ST_UP,
		DISP_ST_DOWN,
		DISP_ST_LEFT,
		DISP_ST_RIGHT
	}EDISPDIRECTION;
	BOOL WINAPI ScrollText(LPCTSTR pString, EDISPDIRECTION eDirection = DISP_ST_LEFT, unsigned int nUnit = 0);

#ifdef __cplusplus
}
#endif

#endif 